package leetcode;

/**
 * @Project : ProgrammingExercises
 * @Package : Leetcode
 * @File : LCP01.java
 * @Author : WangRuoyu
 * @Date 2023/2/22 16:39
 */
public class LCP01 {

    public int game(int[] guess, int[] answer) {
        int res = 0;
        for (int i = 0; i < guess.length; ++i) {
            if (guess[i] == answer[i]) {
                res++;
            }
        }
        return res;
    }

    public static void main(String[] args) {
        LCP01 sl = new LCP01();
        int[] guess = {1, 2, 3};
        int[] answer = {1, 2, 3};
        System.out.println(sl.game(guess, answer));
    }
}

